<?php
namespace Amis\functions;

use Amis\Basics\AmisBasics;

class Breadcrumb extends AmisBasics
{
    public string $type = 'divider';


    public function className($className)
    {
        $this->className = $className;
        return $this;
    }

    public function itemClassName($itemClassName)
    {
        $this->itemClassName = $itemClassName;
        return $this;
    }

    public function separatorClassName($separatorClassName)
    {
        $this->separatorClassName = $separatorClassName;
        return $this;
    }

    public function dropdownClassName($dropdownClassName)
    {
        $this->dropdownClassName = $dropdownClassName;
        return $this;
    }

    public function dropdownItemClassName($dropdownItemClassName)
    {
        $this->dropdownItemClassName = $dropdownItemClassName;
        return $this;
    }

    public function separator($separator)
    {
        $this->separator = $separator;
        return $this;
    }

    public function labelMaxLength(int $labelMaxLength = 16)
    {
        $this->labelMaxLength = $labelMaxLength;
        return $this;
    }

    public function tooltipPosition($type = 'top')
    {
        if (in_array($type, ['top', 'right', 'bottom', 'left'])) {
            $this->tooltipPosition = $type;
        }
        return $this;
    }

    public function source($source)
    {
        $this->source = $source;
        return $this;
    }

    public function lineStyle($lineStyle = 'dashed')
    {
        $this->lineStyle = $lineStyle == 'dashed' ?: 'solid';
        return $this;
    }

    public function items($label = '', $href = '', $icon = '', $dropdown = [])
    {
    }

    public function itemsDropdown($label = '', $href = '', $icon = '')
    {
    }
}